<html>
  <script>
    window.onbeforeunload = (e) => {
      e.returnValue = 'prevent close'
    }
  </script>
</html>
